package com.hzlj.position.dbsync.shanxi.converter;

import java.util.Date;

import com.hzlj.position.dbsync.shanxi.common.dto.tSqjzDevice.TSqjzDeviceAddDTO;
import com.hzlj.position.dbsync.shanxi.common.dto.tSqjzDevice.TSqjzDeviceQueryResultDTO;
import com.hzlj.position.dbsync.shanxi.common.dto.tSqjzDevice.TSqjzDeviceUpdateDTO;
import com.hzlj.position.dbsync.shanxi.common.model.TSqjzDevice;
import com.fz.common.base.converter.ModelDTOConverter;
import com.fz.common.base.core.date.DateUtils;

/**
 * 定位设备表(TSqjzDevice)DTO转换类
 *
 * @author lifh
 * @date 2023-07-17 15:52:40
 */
public class TSqjzDeviceConverter {
    /**
     * model实例转换为查询结果DTO
     *
     * @param model model实例
     * @return DTO
     */
    public static TSqjzDeviceQueryResultDTO from(TSqjzDevice model) {
        return ModelDTOConverter.from(model, TSqjzDeviceQueryResultDTO.class);
    }

    /**
     * 新增DTO转换为model实例
     *
     * @param dto 新增DTO
     * @return model实例
     */
    public static TSqjzDevice from(TSqjzDeviceAddDTO dto) {
        return ModelDTOConverter.from(dto, TSqjzDevice.class, (TSqjzDevice l) -> {
        });

    }

    /**
     * 修改DTO转换为model实例
     *
     * @param dto 修改DTO
     * @return model实例
     */
    public static TSqjzDevice from(TSqjzDeviceUpdateDTO dto) {
        return ModelDTOConverter.from(dto, TSqjzDevice.class, (TSqjzDevice l) -> {
        });
    }
}
